<?php
function phui_title($term,$msg){
	if(strlen($msg)>=$term[1]-2){
		$msg=substr($msg,0,$term[1]-5);
		$msg.='...';
	}
	$term=phui_pos($term,0,0);
	
	phui_colchar('black','white');
	for($i=0; $i<$term[1]; $i++){
		echo(' ');
	}

	$space_size=$term[1]-strlen($msg);
	$space_size=$space_size/2;
	$space_size=floor($space_size);

	$term=phui_pos($term,0,$space_size);
	echo($msg);

	phui_colreset();
	$term=phui_pos($term,2,0);
	return($term);
}
?>
